// <com.woyouqiu.Copyright>
// --------------------------------------------------------------
// <copyright>上海有求网络科技有限公司 2015</copyright>
// <Solution>MyCompany.MyProject</Solution>
// <Project>MyCompany.MyProject.Application</Project>
// <FileName>IProductAppService.cs</FileName>
// <CreateTime>2017-04-18 17:27</CreateTime>
// <Author>何苗</Author>
// <Email>hemiao@woyouqiu.com</Email>
// <log date="2017-04-18 17:27" version="00001">创建</log>
// --------------------------------------------------------------
// </com.woyouqiu.Copyright>

using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using Vecen.BangChuang.BangChuang.Common.Dtos;
using Vecen.BangChuang.BangChuang.Products.Dto;

namespace Vecen.BangChuang.BangChuang.Products {
    /// <summary>
    /// 商品操作
    /// </summary>
    public interface IProductAppService: IApplicationService {
        /// <summary>
        /// 获得单个商品信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ProductDetailOutDto> GetProductAsync(int id);

        /// <summary>
        /// 创建商品
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>

        Task<int> CreateOrUpdateProductAsync(ProductInputDto input);

        /// <summary>
        /// 删除商品
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteProductAsync(int id);

        /// <summary>
        /// 下架
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task OffTheShelfAsync(EntityDto input);

        /// <summary>
        /// 上架
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task OnTheShelfAsync(EntityDto input);

        /// <summary>
        /// 增加库存
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task AddToInventoryAsync(AddToInventoryInputDto input);

        /// <summary>
        /// 获得待编辑商品内容
        /// </summary>
        /// <param name="id">商品ID</param>
        /// <returns></returns>
        Task<ProductInputDto> GetProductForEditAsync(int id);

        /// <summary>
        /// 后台获取商品列表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagedResultDto<ProductListForAdminOutDto>> GetProductsForAdminAsync(GetProductsForAdminInputDto input);

        /// <summary>
        /// 获得全部商品列表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagedResultDto<ProductListOutDto>> GetProductsAsync(GetProductsRequestDto input);

        /// <summary>
        /// 获得今日新品
        /// </summary>
        /// <returns></returns>
        Task<PagedResultDto<ProductListOutDto>> GetProductsForTodayAsync(GetProductsRequestDto input);

        /// <summary>
        /// 获得广告产品
        /// </summary>
        /// <returns></returns>
        Task<PagedResultDto<ProductListOutDto>> GetProductsForAdAsync(GetProductsRequestDto input);

        /// <summary>
        /// 设置广告商品权重
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task SetTopNumberAsync(SetTopNumberInputDto input);

        /// <summary>
        /// 获得分享内容
        /// </summary>
        /// <param name="productId"></param>
        /// <returns></returns>
        Task<ShareModel> GetShareModelByIdAsync(int productId);

        /// <summary>
        /// 分享成功回调
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task ForwardedSuccessCallback(ShareSuccessInputDto input);

        /// <summary>
        /// 商品点击量记录
        /// </summary>
        /// <param name="productId"></param>
        /// <returns></returns>
        Task ClickSuccessCallback(int productId);
    }
}